#include <iostream>
#include <vector>
#define HPF_FACTOR 0.1
#define LPF_FACTOR 0.01

using namespace std;

vector<vector<double> > hpf(vector<vector<double> > in)
{
	vector<vector<double> > ret;
	vector<double> prev;
	prev.push_back(0);
	prev.push_back(0);
	prev.push_back(0);
	for (int i = 0; i < in.size(); i++)
	{
		vector<double> prev1;
		prev1.push_back(in.at(i).at(0) * HPF_FACTOR + prev.at(0) * (1 - HPF_FACTOR));
		prev1.push_back(in.at(i).at(1) * HPF_FACTOR + prev.at(1) * (1 - HPF_FACTOR));
		prev1.push_back(in.at(i).at(2) * HPF_FACTOR + prev.at(2) * (1 - HPF_FACTOR));

		vector<double> cur;
		cur.push_back(in.at(i).at(0) - prev1.at(0));
		cur.push_back(in.at(i).at(1) - prev1.at(1));
		cur.push_back(in.at(i).at(2) - prev1.at(2));

		prev = prev1;

		ret.push_back(cur);
	}
	return ret;
}

vector<vector<double> > lpf(vector<vector<double> > in)
{
	vector<vector<double> > ret;
	vector<double> prev;
	prev.push_back(0);
	prev.push_back(0);
	prev.push_back(0);
	for (int i = 0; i < in.size(); i++)
	{
		vector<double> cur;
		cur.push_back(in.at(i).at(0) * LPF_FACTOR + prev.at(0) * (1 - LPF_FACTOR));
		cur.push_back(in.at(i).at(1) * LPF_FACTOR + prev.at(1) * (1 - LPF_FACTOR));
		cur.push_back(in.at(i).at(2) * LPF_FACTOR + prev.at(2) * (1 - LPF_FACTOR));
		prev = cur;
		ret.push_back(cur);
	}
	return ret;
}

int main()
{

}